package cn.hxzy.common;

import lombok.Data;


import com.aliyun.ocr20191230.Client;
import com.aliyun.teaopenapi.models.Config;

public class OcrClient {
    //    AccessKeyId
    private final static String AccessKeyId = "LTAI5tJsR6uZnmEUoa4c5hzH";
    //    AccessKeySecret
    private final static String AccessKeySecret = "uIzyMm8vPeHSely80OxNksuKneeoBm";
    //    regionId
    private final static String RegionId = "cn-shanghai";

    public   static Client getOCRClient() {
        Config config = new Config();
        //你的accessKeyId
        config.accessKeyId = AccessKeyId;
        //你的accessKeySecret
        config.accessKeySecret = AccessKeySecret;
        config.type = "access_key";
        config.regionId = RegionId;
        try {
            return new Client(config);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
